<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>微信支付</title>
    <script type="text/javascript" src="/js/jquery-2.1.4.js"></script>
    <!-- <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
    <script type="text/javascript" src="/js/we.js?v=1"></script> -->
    <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">
	// 调用微信JS api 支付
	function jsApiCall(){
		WeixinJSBridge.invoke(
			'getBrandWCPayRequest',
			<?php echo $payJsp; ?>,
			function(res){
				if(res.err_msg == "get_brand_wcpay_request:ok" ) {} 
				}
		);
	}
	function callpay(){
		// var parma='<php echo isset($payJsp)?$payJsp:"";?>';
		if (typeof WeixinJSBridge == "undefined"){
		    if( document.addEventListener ){
//		        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
		    }else if (document.attachEvent){
//		        document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
//		        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
		    }
		}else{
		    jsApiCall();
		}
	}
	
	</script>
	<script type="text/javascript">
	window.onload = function(){
		 setTimeout('callpay()',1000);
	};
	</script>
</head>
<body>
    <!--<br/>
    <font color="#9ACD32"><b>该笔订单支付金额为<span style="color:#f00;font-size:50px"><{$price}>元</span>钱</b></font><br/><br/>
	<div align="center">
		<button style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:16px;" type="button" id="buttom" onclick="callpay();" >立即支付</button>
	</div>-->
</body>
</html>